package com.itheima.convertedio;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class ConvertedDemo2 {
    public static void main(String[] args) throws IOException {
        User user = new User("zhangsan", "qwer");
        BufferedWriter bw = new BufferedWriter(new FileWriter("a.txt"));

        bw.write(user.getUserName());
        bw.newLine();
        bw.write(user.getPassword());
        bw.newLine();

        bw.close();
    }
}
